// 每五秒切换一次图片
let currentIndex = 0; // 当前显示的图片索引
function switchImage() {
	let images = document.querySelectorAll("#lunbo img");
	// 隐藏当前图片
	images[currentIndex].style.display = "none";
	// 计算下一张图片的索引
	currentIndex = (currentIndex + 1) % images.length;
	// 显示下一张图片
	images[currentIndex].style.display = "block";
}
//点击显示隐藏框
document.querySelectorAll('.city-option').forEach(function(city) {
	city.addEventListener('click', function(e) {
		e.preventDefault();
		var cityName = this.textContent;
		document.querySelector('.city-name').textContent = cityName;
	});
});
//底部广告
let footerBanner = document.getElementById("footer-banner");
footerBanner.style.left = 0;
//
document.getElementById('close-banner').addEventListener('click', function(event) {
    event.preventDefault(); // 阻止链接默认行为
    var footerBanner = document.getElementById('footer-banner');
    footerBanner.parentNode.removeChild(footerBanner); // 移除横幅
});